home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Dashed lines < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.4 KB  |  [TEXT/ttxt]

  1. Subject:     Dashed lines
  2. Sent:        6/20/96 6:32 PM
  3. Received:    6/24/96 8:26 AM
  4. From:        Bill Hembree, whembree@Sigma4.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. We would like to draw thick dashed lines, but for some reason ODF prohibits
  9. this. The following code is from the SLRender.cpp file:
  10.  
  11. FW_Boolean styleIsDash = MacSelectInkAndStyle(device,
  12.                                               FW_kLineShape,
  13.                                               FW_kFrame,   // We never use
  14. FW_kFill for lines
  15.                                               ink,
  16.                                               style);
  17.  
  18.                 short halfPenh = FW_QDGlobals.thePort->pnSize.h / 2;
  19.                 short halfPenv = FW_QDGlobals.thePort->pnSize.v / 2;
  20.  
  21.                 ::MoveTo(plfmStart.h - halfPenh, plfmStart.v - halfPenv);
  22.  
  23.                 if (styleIsDash && halfPenh == 0 && halfPenv == 0)
  24.                 {
  25.                         FW_CPrivMacDashDraw draw(style->GetDashStyle());
  26.                         draw.LineTo(plfmEnd.h - halfPenh, plfmEnd.v - halfPenv);
  27.                 }
  28.                 else
  29.                 {
  30.                         ::LineTo(plfmEnd.h - halfPenh, plfmEnd.v - halfPenv);
  31.                 }
  32.  
  33.  
  34. Clearly, if you've got a line that's thicker than a hairline, it's not
  35. going to be dashed. Is there any reason for this??
  36.  
  37. Bill, Martin & the Sigma4 gang.
  38.  
  39.